package edu.jsnu.service.ticket.user.dao;

import edu.jsnu.service.ticket.user.domain.User;
import edu.jsnu.service.ticket.user.dto.UserDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    List<UserDto> getAllUser();

    Integer batchDel(Map<String, Integer[]> map);

    User selectByName(String userName);

    Double getBalanceById(@Param(value = "userId") Integer userId);

    Integer updateBalance(@Param("userId") Integer userId, @Param("balance")Double balance);
}